import receiveAddress from '../pages/shippingAddress/receive-address';
import addReceiveAddress  from '../pages/shippingAddress/add-receive-address';
import auth  from '../pages/personalCenter/auth';
import login from '../components/login';
import register from '../components/register';
import test from '../pages/personalCenter/test';
import updata from '../pages/shippingAddress/updataAddress';
import shoppReg from '../pages/personalCenter/shopping-register';
import myMall from '../pages/homePage/myMall';
import commProperty from '../pages/homePage/commodity-property';
import shoppingTrolley from '../pages/shoppingTrolley/shopping-trolley';
import confirmAnorder from '../pages/shoppingTrolley/confirm-anOrder';
import searchForGoods from '../pages/homePage/searchForGoods';

export const routes = [
  { path: '/', redirect: '/myMall'},
  {path: '/auth', name: 'auth', component: auth, redirect: {path: '/auth/login'},
    children: [
      {path: 'login', name: 'login', component: login}, // 子组件path中不能写/
      {path: 'register', name: 'register', component: register},
    ]
  },
  { path: '/receive-address', name: 'receive-address', component: receiveAddress },
  { path: '/add-receive-address', component: addReceiveAddress },
  {path: '/test', component: test},
  {path: '/updataAddress', name: 'updataAddress', component: updata},
  {path: '/shopping-register', name: 'shopping-register', component: shoppReg},
  {path: '/myMall', name: 'myMall', component: myMall},
  {path: '/commodity-property', name: 'commodity-property', component: commProperty},
  {path: '/shopping-trolley', name: 'shopping-trolley', component: shoppingTrolley},
  {path: '/confirm-anOrder', name: 'confirm-anOrder', component: confirmAnorder},
  {path: '/searchForGoods', name: 'searchForGoods', component: searchForGoods},

];
